#加密
def Enc(P,k):
    kls=ExpandKey(k)
    als=list()
    bls=list()
    cls=list()
    dls=list()
    als.append(P[0:32])
    bls.append(P[32:64])
    cls.append(P[64:96])
    dls.append(P[96:128])
    for i in range(47):
        als.append(xor32(F(als[i],kls[2*i]),bls[i]))
        cls.append(xor32(als[i+1],dls[i]))
        dls.append(xor32(F(dls[i],kls[2*i+1]),cls[i]))
        bls.append(xor32(dls[i+1],als[i]))
    bls.append(xor32(F(als[47],kls[94]),bls[47]))
    dls.append(xor32(bls[48],dls[47]))
    cls.append(xor32(F(dls[47],kls[95]),cls[47]))
    als.append(xor32(cls[48],als[47]))
    C=als[48]+bls[48]+cls[48]+dls[48]
    return C
